<template>
	<view>
		<backlog v-if="modelValue==1"></backlog>
		<fieldStatistics v-if="modelValue==2"></fieldStatistics>
	</view>
</template>

<script>
	import backlog from '@/pages/backlog/backlog.vue'
	import fieldStatistics from '@/pages/fieldStatistics/fieldStatistics.vue'
	import {
		mapState
	} from 'vuex' //引入mapState
	export default {
		data() {
			return {
				isKai:'1',
			}
		},
		components: {
			backlog,
			fieldStatistics
		},
		computed: mapState({
			// 从state中拿到数据 箭头函数可使代码更简练
			modelValue: state => state.vuex_tabbar,

		}),
		onPullDownRefresh() {
			console.log('refresh');
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		onShow() {
			
		},
		onLoad() {

		}
	}
</script>

<style>

</style>
